package year2020.month03456;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

public class SetTest {

    public static void main(String[] args){

        List<String> idList = new ArrayList<>();
        idList.add("1");
        idList.add("1");
        idList.add("1");
        idList.add("2");
        idList.add("2");
        idList.add("3");

        for (String id : idList){
            System.out.println(id);
        }
        System.out.println("========");

        idList = new ArrayList<>(new HashSet<>(idList));

        for (String id : idList){
            System.out.println(id);
        }

    }

}
